package com.lx.screenshot.util;

import android.content.Context;

public class DrawableUtil {
    public static int parseResPathToInt(Context context, String resPath){
        int r = 0;
        if (context!=null){
            String value = String.valueOf(resPath).replace("res/drawable-v24/", "").replace(".png", "");
            r = context.getResources().getIdentifier(value, "drawable", context.getPackageName());
        }
        return r;
    }
}
